@import 'libadwaita';

%side_headerbar_left {
  &, &:backdrop {
    background-image: none;
    background-color: rgba($dark_sidebar_bg, 1);
    border-color: rgba($dark_sidebar_bg, 1);
  }

  button:not(.close):not(.minimize):not(.maximize) {
    @extend %flat_button;
  }

  windowcontrols button {
    &.close, &.maximize, &.minimize {
      min-width: 16px;
      min-height: 16px;
      margin: 6px 0;
      padding: 5px 0;
    }
  }
}

%side_headerbar_right {
  &, &:backdrop {
    background-image: none;
    background-color: rgba($base_color, 1);
    border-color: $dark_sidebar_border;
  }
}

%side_searchbar {
  > revealer > box {
    background-color: rgba($dark_sidebar_bg, 1);
    border-color: $dark_sidebar_border;
  }
}

%side_separator {
  &, &:backdrop {
    background-image: if($variant =='light', image($solid_borders_color), image($header_border));
    background-color: transparent;
    border-right: none;
  }
}

//
// Nautilus
//

%nautilus_pathbar_button {
  margin: 0;
  border: none;
  box-shadow: none;
  border-radius: $bt_radius - 2px;
  padding: 0 $container_padding;
  min-height: if($variant =='light', 20px, 22px);

  &:not(:hover):not(:active):not(:checked) {
    background: none;
  }

  &:hover:not(:active):not(:checked) {
    background-color: rgba($header_fg, 0.15);
    background-image: none;
  }
}

.nautilus-window {
  headerbar {
    revealer > box > widget > box {
      > button:last-child {
        margin-left: -6px;
      }
    }

    box > stack {
      margin: -3px 0;
    }

    .linked > entry {
      margin: 0;
    }
  }

  flap.unfolded {
    > placessidebar.background {
      background: none;

      list.navigation-sidebar {
        background-color: $dark_sidebar_bg;
      }
    }

    > separator.horizontal {
      background-color: $dark_sidebar_border;
    }
  }

  flap.folded {
    > placessidebar {
      border-right: 1px solid $dark_sidebar_border;
    }
  }
}

// Floating Bar
.floating-bar {
  padding: 2px;
  background-color: $selected_bg_color;
  color: $selected_fg_color;
  border-radius: $wm_radius - $container_padding;
  margin: $container_padding / 2;
  box-shadow: $shadow_5;

  > button.circular.flat {
    border-radius: $circular_radius;
    min-height: 24px;
    min-width: 24px;
    padding: 0;
    -gtk-icon-shadow: none;
    @extend %selected_button;
  }
}

child.activatable {
  border-radius: $bt_radius * 1.5;

  &:hover {
    background-color: rgba($fg_color, 0.1);
    color: $fg_color;
  }

  &:active {
    background-color: rgba($fg_color, 0.2);
    color: $fg_color;
    transition: $shorter_transition;
  }

  &:selected {
    background-color: rgba($fg_color, 0.12);
    color: $fg_color;

    &:hover {
      background-color: rgba($fg_color, 0.16);
    }

    &:active {
      background-color: rgba($fg_color, 0.22);
    }
  }
}

.nautilus-grid-view {
  background-color: $base_color;

  child.activatable {
    padding: 0;

    #NautilusViewCell {
      padding: $base_padding;

      .icon-ui-labels-box {
        margin: 0 0 $base_padding * 2;
        border-spacing: 0;
      }

      .dim-label {
        border-spacing: 0;
      }
    }
  }
}

.nautilus-list-view {
  padding: 0;
  margin: 0;
  border-spacing: 0;
  background-color: $base_color;

  listview.view {
    padding: 0;
    margin: 0;
    border-spacing: $container_padding / 2;

    > row.activatable {
      padding: 0;
      margin: 0;

      > cell {
        padding: 0;

        > widget#NautilusViewCell {
          padding: $container_padding / 2 $container_padding * 1.5;
        }
      }

      &:nth-child(odd):not(:disabled) {
        background-image: image(gtkalpha(currentColor, 0.03));
      }
    }
  }
}

#NautilusViewCell {
  clamp box {
    margin: 0;
    border-spacing: 0;
  }
}

#NautilusQueryEditor {
  // search entry
  margin: 0;
  border-spacing: 4px;
  border-radius: $bt_radius;
  background-clip: padding-box;
  border-image: none;
  outline: 0 solid transparent;
  outline-offset: -2px;

  @if $variant =='light' {
    border: 1px solid $borders_color;
  }

  @else {
    border: none;
  }

  &:focus-within {
    border-image: none;
    outline-color: $entry_highlight;
    outline-width: 2px;
    border-color: $selected_bg_color;
  }

  > * {
    margin-top: 2px;
    margin-bottom: 2px;
  }

  #NautilusQueryEditorTag {
    @extend .entry-tag;

    > button {
      margin: 0;
    }
  }

  > menubutton > button {
    min-width: 20px;
    min-height: 20px;
    margin: 0;
    padding: 0;
    border: none;
    border-radius: 100px;
    @extend %nautilus_pathbar_button;
  }

  > box,
  > text,
  > image {
    margin: 0;
  }
}

#NautilusPathBar {
  border-radius: $bt_radius;
  border: 1px solid $borders_color;
  padding: 2px;
  background-clip: padding-box;
  @include button(header-normal);

  > menubutton {
    margin: 0;

    > button {
      @extend %nautilus_pathbar_button;
    }
  }
}

#NautilusPathButton {
  @extend %nautilus_pathbar_button;

  .dim-label {
    opacity: 0.75;
  }

  &.current-dir {
    color: $header_fg;

    &:hover, &:active {
      background: none;
      box-shadow: none;
    }
  }
}

navigation-view-page > toolbarview > scrolledwindow > viewport > clamp {
  > box > box > stack > button {
    margin-top: $container_padding * 2;
  }
}

// Extensions
window.nightthemeswitcher headerbar {
  background: $header_bg;
  color: $header_fg;
}

//
// Gnome Control Center
//

window.background.csd {
  > contents {
    > leaflet.unfolded > box {
      > headerbar {
        @extend %side_headerbar_left;
      }

      > searchbar {
        @extend %side_searchbar;
      }

      > stack > widget > box > widget > headerbar,
      > stack > widget > overlay > leaflet.folded > box > headerbar {
        @extend %side_headerbar_right;
      }

      > scrolledwindow > viewport > widget > stack {
        > list.navigation-sidebar {
          background-color: rgba($dark_sidebar_bg, 1);

          > separator {
            background-color: transparent;
            margin: 0;
            min-height: 0;
          }
        }

        > box > list.navigation-sidebar {
          background-color: rgba($dark_sidebar_bg, 1);
        }
      }

      > stack.background {
        background-color: $base_color;
      }
    }
  }
}

preferencesgroup > box {
  button.background-preview-button {
    padding: $container_padding / 2;
    outline: 2px solid transparent;
    outline-offset: 0;
    border-radius: $bt_radius + $container_padding / 2;

    &, &:hover, &:active, &:checked {
      background: none;
      border: none;
      box-shadow: none;
    }

    &:hover {
      outline-color: $alt_disabled_fg_color;
    }

    &:active {
      outline-color: $alt_fg_color;
    }

    &:checked {
      outline-color: $selected_bg_color;
    }
  }

  flowbox.background-flowbox > flowboxchild {
    outline: 2px solid transparent;
    outline-offset: 0;
    border-radius: $bt_radius + 3px;
    padding: 3px;

    &:hover {
      outline-color: $alt_disabled_fg_color;
    }

    &:active {
      outline-color: $alt_fg_color;
    }

    &:selected {
      outline-color: $selected_bg_color;
      background-color: transparent;
    }
  }
}


//
// Gnome Calendar / Gnome Contacts
//

window.background {
  > contents > toastoverlay > leaflet {
    > box {
      background-color: $base_color;

      > headerbar {
        &, &:backdrop {
          background: none;
          border: none;
        }

        > windowhandle > box {
          padding: 0 10px;
        }

        button:not(.destructive-action):not(.suggested-action):not(.close):not(.maximize):not(.minimize) {
          @extend %flat_button;
          margin-top: 8px;
          margin-bottom: 8px;
        }

        menubutton > button:not(.destructive-action):not(.suggested-action):not(.close):not(.maximize):not(.minimize) {
          margin-top: 0;
          margin-bottom: 0;
        }
      }

      + separator {
        @extend %side_separator;

        + box {
          background-color: $dark_sidebar_bg;
        }
      }

      > .view, list:not(.boxed-list) {
        background-color: transparent;
      }

      list > row textview {
        padding: $container_padding;
        border-left: 1px solid $borders_color;

        &, & > text {
          background: none;
        }
      }
    }

    .current-week {
      background-color: $fill_color;
    }

    button.circular.day {
      border: none;
      box-shadow: none;
      min-height: $menuitem_size;
      min-width: $menuitem_size;
      background-color: transparent;
      background-image: none;

      &:hover {
        @include button(flat-hover);
      }

      &:active {
        @include button(flat-active);
      }

      &:selected {
        background-color: $selected_bg_color;
        color: $selected_fg_color;
      }
    }

    datechooser navigator > button.flat.pill {
      padding: 0 $container_padding * 2;
      min-height: $menuitem_size;
      min-width: $menuitem_size;
    }
  }

  &.maximized, &.tiled {
    > contents > toastoverlay > leaflet {
      > box {
        > headerbar {
          &, &:backdrop {
            background: none;
            border: none;
          }
        }
      }
    }
  }
}

menubutton.flat.popup.sources-button {
  margin: 0;

  > button {
    margin: 0;
    border-radius: 0;
    padding: 0 $container_padding * 2;

    .title {
      font-size: small;
      font-weight: normal;
    }

    .title, .subtitle {
      padding: 2px 0 2px $container_padding;
    }

    image.calendar-color-image {
      -gtk-icon-size: 8px;
    }
  }
}

// Contacts
.contacts-editor-address {
  > entry.flat {
    &:not(:last-child) {
      box-shadow: inset 0 -1px $borders_color;
    }

    &:first-child {
      border-radius: $bt_radius $bt_radius 0 0;
    }

    &:last-child {
      border-radius: 0 0 $bt_radius $bt_radius;
    }
  }
}

//
// Gnome Software
//

.details-page {
  margin: $container_padding * 4 0px;
}

.installed-overlay-box {
  font-size: smaller;
  background-color: $primary_color;
  border-radius: 0;
  color: $light_fg_color;
  text-shadow: 0 1px 0 rgba(black, 0.2);
}

screenshot-carousel box.frame {
  border-width: 1px 0;
  border-radius: 0;
}

screenshot-carousel button,
.featured-carousel button {
  margin: $container_padding * 2;
}

.screenshot-image-main .image1,
.screenshot-image-main .image2 {
  margin-top: $container_padding;
  margin-bottom: $container_padding * 2;
  margin-left: $container_padding;
  margin-right: $container_padding;
}

.app-tile-label {
  font-size: 105%;
}

.review-textbox {
  padding: $container_padding;
}

.origin-rounded-box {
  background-color: $divider_color;
  border-radius: $circular_radius;
  padding: $container_padding - 2px;
}

.origin-beta {
  color: $warning_color;
}

.origin-button > button {
  padding: $container_padding / 2 $container_padding * 1.5;
}

flowboxchild.card:not(.category-tile) {
  padding: 0;
  border: none;
  box-shadow: none;
  background: none;
}

.category-tile.card {
  padding: $container_padding * 3.5;
  border: none;
  border-radius: $bt_radius;
  min-width: 140px;
  font-weight: 900;
  font-size: larger;
  background-clip: border-box;
  box-shadow: 0 3px 6px rgba(black, 0.08);
  border-radius: $mn_radius;
  border-width: 0;

  &.category-tile-iconless {
    padding: $container_padding * 1.5 $container_padding * 2.5;
    box-shadow: none;
    border-width: 1px;
    border-radius: $bt_radius;
    min-width: 130px;
    font-size: 105%;
    font-weight: normal;
  }
}

app-context-bar {
  button.context-tile {
    padding: 6px;
  }

  > box:not(:first-child) > button.flat {
    border-radius: 0;

    &:last-child {
      border-radius: 0 $bt_radius $bt_radius 0;
    }
  }

  > box:first-child > button.flat {
    border-radius: 0;

    &:first-child {
      border-radius: $bt_radius 0 0 $bt_radius;
    }
  }

  > box > button.flat {
    border-left-color: $borders_color;
  }
}

.application-details-description {
  button.circular.text-button {
    border-radius: $bt_radius;
    min-height: 24px;
    padding: 0 8px;
  }
}

.context-tile-lozenge {
  min-height: 28px;
  min-width: 28px;
  padding: $container_padding;

  &.grey {
    color: $text_color;
    background-color: $divider_color;
  }

  &.green, &.details-rating-0 {
    color: darken($success_color, 15%);
    background-color: rgba($success_color, 0.15);
  }

  &.blue,
  &.details-rating-5 {
    color: $theme_color_blue;
    background-color: rgba($theme_color_blue, 0.15);
  }

  &.yellow, &.details-rating-12 {
    color: darken($warning_color, 15%);
    background-color: rgba($warning_color, 0.15);
  }

  &.details-rating-15 {
    color: $theme_color_orange;
    background-color: rgba($theme_color_orange, .15);
  }

  &.red, &.details-rating-18 {
    color: darken($error_color, 15%);
    background-color: rgba($error_color, 0.15);
  }
}

screenshot-carousel box.frame.view {
  border-width: 1px 0;
  border-radius: 0;
}

// Styling for specific category buttons.
.category-tile.category-create {
  background: linear-gradient(180deg, #ce8cd7 0%, #2861c6 100%);
  color: white;

  &:hover {
    background: linear-gradient(180deg, shade(#ce8cd7, 1.07) 0%, shade(#2861c6, 1.1) 100%);
    color: white;
  }

  &:active {
    background: linear-gradient(180deg, shade(#ce8cd7, .95) 0%, shade(#2861c6, .95) 100%);
    color: white;
  }
}

.category-tile.category-develop {
  background: #5e5c64;
  color: white;

  &:hover {
    background: shade(#5e5c64, 1.2);
    color: white;
  }

  &:active {
    background-color: shade(#5e5c64, .95);
    color: white;
  }
}

.category-tile.category-learn {
  background: linear-gradient(180deg, #2ec27e 30%, #27a66c 100%);
  color: white;

  &:hover {
    background: linear-gradient(180deg, shade(#2ec27e, 1.06) 30%, shade(#27a66c, 1.06) 100%);
    color: white;
  }

  &:active {
    background: linear-gradient(180deg, shade(#2ec27e, .95) 30%, shade(#27a66c, .95) 100%);
    color: white;
  }
}

.category-tile.category-play {
  background: linear-gradient(75deg, #f9e2a7 0%, #eb5ec3 50%, #6d53e0 100%);
  color: #393484;

  &:hover {
    background: linear-gradient(75deg, shade(#f9e2a7, 1.07) 0%, shade(#eb5ec3, 1.07) 50%, shade(#6d53e0, 1.07) 100%);
    color: #393484;
  }

  &:active {
    background: linear-gradient(75deg, shade(#f9e2a7, .97) 0%, shade(#eb5ec3, .95) 50%, shade(#6d53e0, 1.07) 100%);
    color: #393484;
  }
}

.category-tile.category-socialize {
  background: linear-gradient(90deg, #ef4e9b 0%, #f77466 100%);
  color: white;

  &:hover {
    background: linear-gradient(90deg, shade(#ef4e9b, 1.08) 0%, shade(#f77466, 1.08) 100%);
    color: white;
  }

  &:active {
    background: linear-gradient(90deg, shade(#ef4e9b, .95) 0%, shade(#f77466, .95) 100%);
    color: white;
  }
}

.category-tile.category-work {
  padding: 1px;
  /* FIXME: work around https://gitlab.gnome.org/GNOME/gtk/-/issues/4324 */
  color: #1c71d8;
  background-color: #fdf8d7;
  background-image: linear-gradient($borders_color 1px, transparent 1px),
    linear-gradient(90deg, $borders_color 1px, transparent 1px);
  background-size: 10px 10px, 10px 10px;
  background-position: -1px -4px, center -1px;

  &:hover {
    background-color: lighten(#fdf8d7, 5%);
    background-image: linear-gradient($borders_color 1px, transparent 1px),
      linear-gradient(90deg, $borders_color 1px, transparent 1px);
  }

  &:active {
    background-color: darken(#fdf8d7, 5%);
    background-image: linear-gradient($borders_color 1px, transparent 1px),
      linear-gradient(90deg, $borders_color 1px, transparent 1px);
  }
}

clamp.medium .category-tile:not(.category-tile-iconless),
clamp.large .category-tile:not(.category-tile-iconless) {
  font-size: larger;
}

// The rest of the featured-tile CSS is loaded at runtime in gs-feature-tile.c
.featured-tile {
  padding: 0;
  box-shadow: none;

  label.title-1 {
    margin-top: $container_padding;
    margin-bottom: $container_padding;
  }

  &.narrow label.title-1 {
    font-size: 16pt;
  }
}

.application-details-infobar {
  &, &.info {
    background-color: $fill_color;
    color: $fg_color;
    border: 1px solid $borders_color;
  }

  &.warning {
    background-color: $warning_color;
    color: $light_fg_color;
    border: 1px solid $divider_color;
  }
}

@keyframes install-progress-unknown-move {
  0% {
    background-position: 0%;
  }

  50% {
    background-position: 100%;
  }

  100% {
    background-position: 0%;
  }
}

.application-details-description .button {
  padding-left: $container_padding * 4;
  padding-right: $container_padding * 4;
}

.install-progress {
  background-image: linear-gradient(to top, $primary_color 2px, gtkalpha($primary_color, 0) 2px);
  background-repeat: no-repeat;
  background-position: 0 bottom;
  background-size: 0;
  transition: none;
}

.install-progress:dir(rtl) {
  background-position: 100% bottom;
}

.review-row > * {
  margin: $container_padding * 2;
}

.review-row button {
  font-size: smaller;
}

.review-row .vote-buttons button {
  margin-right: -1px;
}

// this is the separator between yes and no vote buttons, gtk+ 3.20 only
.review-row .vote-buttons button:not(:first-child) {
  border-image: linear-gradient(to top, $borders_color, $borders_color) 0 0 0 1 / 5px 0 5px 1px;
}

.review-row .vote-buttons button:hover,
.review-row .vote-buttons button:active,
.review-row .vote-buttons button:hover + button,
.review-row .vote-buttons button:active + button {
  border-image: none;
}

review-bar {
  color: $disabled_fg_color;
  background-image: none;
  background-color: $track_color;
}

.review-histogram star-image {
  color: $disabled_fg_color;
}

.version-arrow-label {
  font-size: x-small;
}

.overview-more-button {
  font-size: smaller;
  padding: 0 $container_padding * 2 + 4px;
}

.app-row-origin-text {
  font-size: smaller;
}

.app-listbox-header {
  padding: $container_padding;
  border-bottom: 1px solid $borders_color;
}

.image-list {
  background-color: transparent;
}

box.star {
  background-color: transparent;
  background-image: none;
}

button.star {
  outline-offset: 0;
  background-color: transparent;
  background-image: none;
  border-image: none;
  border-radius: 0;
  border-width: 0;
  padding: 0;
  box-shadow: none;
  outline-offset: -1px;
}

star-image {
  color: $theme_color_yellow;
}

.dimmer-label {
  opacity: 0.25;
}

.update-failed-details {
  font-family: Monospace;
  font-size: smaller;
  padding: $container_padding * 2 + 4px;
}

.upgrade-banner {
  padding: 0px;
  border-radius: $bt_radius;
  border: none;
}

.upgrade-banner-background {
  background: linear-gradient(to bottom, $success_color, $suggested_color);
  color: white;
}

.upgrade-buttons #button_upgrades_install {
  padding-left: $container_padding * 2 + 4px;
  padding-right: $container_padding * 2 + 4px;
}

scrolledwindow.list-page > viewport > clamp > box {
  margin: $container_padding * 4 $container_padding * 2;
  border-spacing: $container_padding * 4;
}

.update-preferences preferencesgroup > box > box {
  margin-top: $container_padding * 3;
}

.section > label:not(:first-child) {
  margin-top: $container_padding;
}

.section > box:not(:first-child) {
  margin-top: $container_padding * 2;
}

clamp.status-page {
  margin: $container_padding * 6 $container_padding * 2;
}

clamp.status-page .iconbox {
  min-height: 128px;
  min-width: 128px;
}

clamp.status-page .icon {
  color: $disabled_fg_color;
  min-height: 32px;
  min-width: 32px;
}

clamp.status-page .icon:not(:last-child) {
  margin-bottom: $container_padding * 6;
}

clamp.status-page .title:not(:last-child) {
  margin-bottom: $container_padding * 2;
}

app-context-bar {
  .context-tile {
    border: 1px solid $borders_color;
    background-color: transparent;
    border-radius: 0;
    padding: $container_padding * 4 $container_padding * 2 $container_padding * 3.5 $container_padding * 2;
    outline-offset: 5px;
    transition-property: outline, outline-offset, background-image;
    border-bottom: none;
    border-right: none;

    &:hover {
      background-image: none;
      background-color: $divider_color;
    }

    &.keyboard-activating,
    &:active {
      background-color: $track_color;
    }

    &:focus:focus-visible {
      outline-offset: -1px;
    }
  }

  &.horizontal box:first-child .context-tile:first-child,
  &.vertical .context-tile:first-child {
    border-left: none;
  }

  &.horizontal .context-tile,
  &.vertical box:first-child .context-tile {
    border-top: none;
  }

  > box:not(:first-child) > button.flat {
    border-radius: 0;

    &:last-child {
      border-radius: 0 $bt_radius $bt_radius 0;
    }
  }

  > box:first-child > button.flat {
    border-radius: 0;

    &:first-child {
      border-radius: $bt_radius 0 0 $bt_radius;
    }
  }

  > box > button.flat {
    border-left-color: $borders_color;
  }
}

carousel.card {
  border: none;
  background-color: $fill_color;
}

.context-tile-lozenge {
  min-height: 28px;
  min-width: 28px;
  padding: $container_padding;
  font-size: 18px;
  font-weight: bold;
  border-radius: $circular_radius;

  &.large {
    font-size: 24px;
    padding: 16px;
    min-width: 24px;
    /* 60px minus the left and right padding */
    min-height: 24px;
    /* 60px minus the top and bottom padding */
  }

  &.wide-image image {
    margin-top: -28px;
    margin-bottom: -28px;
  }

  image {
    -gtk-icon-style: symbolic;
  }

  &.grey {
    color: $fg_color;
    background-color: $divider_color;
  }

  &.green, &.details-rating-0 {
    color: darken($theme_color_green, 15%);
    background-color: rgba($theme_color_green, 0.15);
  }

  &.blue,
  &.details-rating-5 {
    color: $theme_color_blue;
    background-color: rgba($theme_color_blue, 0.15);
  }

  &.yellow, &.details-rating-12 {
    color: darken($theme_color_yellow, 15%);
    background-color: rgba($theme_color_yellow, 0.15);
  }

  &.details-rating-15 {
    color: $theme_color_orange;
    background-color: rgba($theme_color_orange, .15);
  }

  &.red, &.details-rating-18 {
    color: darken($theme_color_red, 15%);
    background-color: rgba($theme_color_red, 0.15);
  }
}

.eol-red {
  font-weight: bold;
  color: $error_color;
}

window.narrow .app-title {
  font-size: 16pt;
}

window.narrow .app-developer {
  font-size: small;
}

.install-progress-label {
  font-size: smaller;
  font-feature-settings: "tnum";
}

scrolledwindow.fake-adw-status-page > viewport > box {
  margin: $container_padding * 6 $container_padding * 2;
}

scrolledwindow.fake-adw-status-page > viewport > box > clamp:not(:last-child) > box {
  margin-bottom: $container_padding * 6;
}

scrolledwindow.fake-adw-status-page > viewport > box > clamp > box > .icon:not(:last-child) {
  margin-bottom: $container_padding * 6;
}

scrolledwindow.fake-adw-status-page > viewport > box > clamp > box > .title:not(:last-child) {
  margin-bottom: $container_padding * 2;
}

statuspage.icon-dropshadow image.icon {
  -gtk-icon-shadow: 0 1px 12px rgba(0, 0, 0, 0.05),
    0 -1px rgba(0, 0, 0, 0.05),
    1px 0 rgba(0, 0, 0, 0.1),
    0 1px rgba(0, 0, 0, 0.3),
    -1px 0 rgba(0, 0, 0, 0.1);
}

window.info scrollbar.vertical {
  margin-top: 48px;
  background: none;
  box-shadow: none;
}

window.info scrollbar.vertical trough {
  margin-top: 0;
}

// GsAppRow
row.app > box.header {
  margin-left: $container_padding * 2;
  margin-right: $container_padding * 2;
}

row.app > box.header {
  border-spacing: $container_padding * 2;
}

row.app > box.header > image {
  margin-top: $container_padding * 2;
  margin-bottom: $container_padding * 2;
}

row.app label.warning {
  color: $warning_color;
}

// GtkSpinner

// Ensure the spinner is hidden before the animation is triggered.
@keyframes pre-delay {
  from {
    opacity: 0;
  }

  to {
    opacity: 0;
  }
}

@keyframes fade-in {
  from {
    filter: opacity(0%);
  }
}

/* Give a fade-in animation to spinners. */
spinner.fade-in:checked {
  animation: pre-delay 0.5s linear 1, fade-in 1s linear 1, spin 1s linear infinite;
  animation-delay: 0s, 0.5s, 0.5s;
}

//
// Calculator
//

.history-view {
  background-color: $base_color;
}

.card {
  &.display-container {
    border: 1px solid $borders_color;
  }

  #displayitem {
    border-top: 1px solid $borders_color;
  }

  .small & {
    border-radius: 0;

    &.forecast-card {
      border-width: 1px 0;
    }

    &.display-container {
      border-width: 0 0 1px 0;
    }
  }
}

//
// Gnome TextEditor
//

.org-gnome-TextEditor {
  headerbar > windowhandle > box {
    > widget > box.vertical {
      margin-top: -6px;
      margin-bottom: -6px;
    }
  }
}

//
// Misc (other)
//

#desktopwindow.background {
  background: none;
}